<template>
    <view>
        <u-tabbar icon-size="1.4rem" :list="list" :value="current?current:0" @change="tabbarChange" :fixed="true"
            :placeholder="false" bg-color="#fff" height="3rem" :safeAreaInsetBottom="true" activeColor="#dd524d">
        </u-tabbar>
    </view>
</template>

<script>
    export default {
        props: {
            current: Number
        },
        data() {
            return {
                list: [{
                    path: "pages/index/index",
                    iconPath: "home",
                    selectedIconPath: "home-fill",
                    text: '首页',
                }, {
                    path: "pages/account/index",
                    iconPath: "account",
                    selectedIconPath: "account-fill",
                    text: '我的',
                }]
            };
        },
        methods: {
            tabbarChange(e) {
                uni.navigateTo({
                    url: "/" + this.list[e].path
                })
            }
        }
    }
</script>

<style lang="scss">

</style>